﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace P2PChat.Log
{
    public partial class Form_Log : Form, P2PChat.Log.ILog
    {
        public Form_Log()
        {
            InitializeComponent();
        }

        public string FilePath
        {
            get { return null; }
        }

        public void Write()
        {
            return;
        }

        private delegate void AddDelegate(params string[] contents);
        public void Add(params string[] contents)
        {
            if (txt_Log.InvokeRequired)
            {
                this.Invoke(new AddDelegate(Add), (object)contents);
            }
            else
            {
                txt_Log.Text = contents[0] + Environment.NewLine + txt_Log.Text;
            }
        }
    }
}
